<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>url解码</title>
	</head>
	<body>
		<script>
//		  encodeURIComponent() 既能对多字节非法字符编码 又能对单字节非法字符编码
//		  decodeURIComponent() 既能对多字节非法字符解码 又能对单字节非法字符解码
          var k="我就是大神的朋友"
          var kt="httpt//tmooc.cnß"
          var s="https://www.baidu.com/s?wd="
          k=encodeURIComponent(k)
          console.log(k)
          console.log(k+s)
		  console.log("欢迎访问"+decodeURIComponent(k))
			
			
			
		</script>
		
		
	</body>
</html>
